-- GENERATED SPELL FOR [Dreamstalker] --


function spell0_12498(pUnit, Event) --@Corrosive Acid Breath,n/a--
pUnit:FullCastSpellOnTarget(20667,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12498', 30000, 1)
end

function spell1_12498(pUnit, Event) --@Sleep,n/a--
pUnit:FullCastSpellOnTarget(20669,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12498', 11300, 1)
end

function Sorts_12498(pUnit, Event)
local choix_sorts_12498 = math.random(0, 1)
if choix_sorts_12498 == 0 then
pUnit:RegisterEvent('spell0_12498', 1, 1)
end
if choix_sorts_12498 == 1 then
pUnit:RegisterEvent('spell1_12498', 1, 1)
end
end

function mob12498_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12498', math.random(1500, 3000), 1)
end

function mob12498_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12498_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12498_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12498, 1, 'mob12498_Action')
RegisterUnitEvent(12498, 2, 'mob12498_Leave')
RegisterUnitEvent(12498, 3, 'mob12498_Kill')
RegisterUnitEvent(12498, 4, 'mob12498_Die')
